<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title>YDZK</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

		<!-- CSS here -->
        <link rel="stylesheet" href="static/css/bootstrap.min.css">
        <link rel="stylesheet" href="static/css/animate.min.css">
        <link rel="stylesheet" href="static/css/magnific-popup.css">
        <link rel="stylesheet" href="static/css/fontawesome-all.min.css">
        <link rel="stylesheet" href="static/css/owl.carousel.min.css">
        <link rel="stylesheet" href="static/css/jquery-ui.min.css">
        <link rel="stylesheet" href="static/css/flaticon.css">
        <link rel="stylesheet" href="static/css/odometer.css">
        <link rel="stylesheet" href="static/css/aos.css">
        <link rel="stylesheet" href="static/css/slick.css">
        <link rel="stylesheet" href="static/css/default.css">
        <link rel="stylesheet" href="static/css/style.css">
        <link rel="stylesheet" href="static/css/responsive.css">
        <link rel="stylesheet" href="static/css/mystyle.css">

        <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=pW8PLlcJIYV6VUmCcc1TE5wee2WHUsjK"></script>
        <style type="text/css">  
            html{height:100%}    
            body{height:80%;padding:0px}    
            #container{
                height:100%;
                height: 140%;
            }    

            .wave1 {
                width: 170px;
                height: 170px;
                background: darkturquoise;
                border-radius: 50%;
                position: absolute;
                transform: translate(-50%,-50%);
                opacity: 0.8;
                overflow: hidden;
            }

            .wave1::after {
                content: "";
                width: 250px;
                height: 250px;
                background-color: #FFFFFF;
                opacity: 0.8;
                position: absolute;
                left: 50%;
                top: 72%;
                transform: translate(-50%,-95%);
                border-radius: 40%;
                animation: wave2 7s linear infinite;
                z-index: 1;
            }

            .wave1::before {
                content: "14%";
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%,-50%);
                color: black;
                font-size: 24px;
                font-weight: bold;
                z-index: 2;
                text-transform: uppercase;
            }

            .wave2 {
                width: 170px;
                height: 170px;
                background: darkturquoise;
                border-radius: 50%;
                position: absolute;
                transform: translate(-50%,-50%);
                opacity: 0.8;
                overflow: hidden;   
            }
            .wave2::after {
                content: "";
                width: 300px;
                height: 300px;
                background-color: #FFFFFF;
                opacity: 0.8;
                position: absolute;
                left: 50%;
                top: 0;
                transform: translate(-50%,-95%);
                border-radius: 40%;
                animation: wave2 5s linear infinite;
                z-index: 1;
            }
            .wave2::before {
                content: "97%";
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%,-50%);
                color: black;  /* 将文字颜色设置为黑色 */
                font-size: 24px;  /* 增加字体大小 */
                font-weight: bold;  /* 使字体加粗 */
                z-index: 2;
                text-transform: uppercase;
            }

            @keyframes wave2 {
                100% {
                    transform: translate(-50%,-90%) rotate(360deg);
                }
            }


        </style> 

        <style>
        .custom-control {
            position: absolute;
            background: rgba(38, 171, 33, 0.393); /* 半透明绿色背景 */
            border-radius: 8px;
            padding: 10px;
            z-index: 1000;  /* 确保控件在地图上层 */
            width: 350px;  /* 根据需要调整宽度 */
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        
        .custom-control h4 {
            color: #333; /* 标题颜色 */
            /* background-color: rgb(0, 255, 213,0.5); */
            margin-bottom: 5px;
        }
        
        .custom-control p {
            color: #232528; /* 文本颜色 */
        }
        </style>
    </head>
    <body>
        <!-- preloader  -->
        <div id="preloader">
            <div id="ctn-preloader" class="ctn-preloader">
                <div class="animation-preloader">
                    <div class="spinner"></div>
                    <div class="txt-loading">
                        <span data-text-preloader="Y" class="letters-loading">Y</span>
                        <span data-text-preloader="D" class="letters-loading">D</span>
                        <span data-text-preloader="Z" class="letters-loading">Z</span>
                        <span data-text-preloader="K" class="letters-loading">K</span>
                    </div>
                </div>
                <div class="loader">
                    <div class="row">
                        <div class="col-3 loader-section section-left">
                            <div class="bg"></div>
                        </div>
                        <div class="col-3 loader-section section-left">
                            <div class="bg"></div>
                        </div>
                        <div class="col-3 loader-section section-right">
                            <div class="bg"></div>
                        </div>
                        <div class="col-3 loader-section section-right">
                            <div class="bg"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- preloader end -->

		<!-- Scroll-top -->
        <button class="scroll-top scroll-to-target" data-target="html">
            <i class="fas fa-angle-up"></i>
        </button>
        <!-- Scroll-top-end-->

        <!-- header-area -->
        <header class="header-style-two" style="background-color: white;">

            <!-- menu-area -->
            <div id="sticky-header" class="main-header menu-area">
                <div class="custom-container-two">
                    <div class="row">
                        <div class="col-12">
                            <div class="mobile-nav-toggler"><i class="fas fa-bars"></i></div>
                            <div class="menu-wrap">
                                <nav class="menu-nav show">
                                    <div class="logo">
                                        <a href="#"><img src="static/img/logo/Logo.png" alt="Logo"></a>
                                    </div>
                                    <div class="text-with-spacing">
                                        <p>云端智控</p>
                                        <p>新型配电网监测与故障处理技术领航者</p>                                        </p>
                                    </div>
                                    <div class="navbar-wrap main-menu d-none d-lg-flex">
                                        <ul class="navigation">
                                            <li><a href="/index">主页</a></li>
                                            <li><a href="#about">关于</a></li>
                                            <li><a href="#about">加入我们</a></li>
                                        </ul>
                                    </div>
                                    <div class="header-action d-none d-md-block">
                                        <ul>
                                            <li><a href="#"><i class="flaticon-two-arrows"></i></a></li>
                                            <li><a href="#"><i class="flaticon-heart"></i></a></li>
                                            <li class="header-shop-cart"><a href="#"><i class="flaticon-shopping-bag"></i></a>
                                                {% if cid == None %}
                                                    <span class="cart-total-price">未登录</span>
                                                    <ul class="minicart">
                                                        <li>
                                                            <div class="total-price">
                                                                <span class="f-left">请先登录！</span>
                                                                <span class="f-right"></span>
                                                            </div>
                                                        </li>
                                                        <li>
                                                            <div class="checkout-link">
                                                                <a class="red-color" href="/">登录</a>
                                                            </div>
                                                        </li>
                                                    </ul>
                                                {% else %}
                                                    <span class="cart-total-price">{{ cname }}</span>
                                                    <ul class="minicart">
                                                        <li>
                                                            <div class="total-price">
                                                                <span class="f-left">您好! {{ cname }}</span>
                                                                <span class="f-right">您的编号是: {{ cid }}</span>
                                                            </div>
                                                        </li>
                                                        <li>
                                                            <div class="checkout-link">
                                                                <a class="red-color" href="/logout">退出登录</a>
                                                            </div>
                                                        </li>
                                                    </ul>
                                                {% endif %}
                                            </li>
                                        </ul>
                                    </div>
                                </nav>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- menu-area-end -->
        </header>
        <div id="container"></div>
        <div id="fault-prediction" class="custom-control" style="top: 150px;left: 50px;">
            <h4>故障诊断事件</h4>
            <div id="faults"></div>
        </div>
        <script>
            // 将故障信息存储在一个数组中
            var faultsArray = [
                "临桂开闭柜嘉华为线线路发生单相接地故障",
                "临桂开闭柜飞华为线线路没有判断出故障",
                "临桂开闭柜嘉秧九Ⅱ线线路没有判断出故障",
                "临桂开闭柜嘉秧九Ⅰ线线路发生两相接地故障",
                "感知南宁实境平台01线线路没有判断出故障",
                "感知南宁实境平台02线线路没有判断出故障",
                "感知南宁实境平台03线线路没有判断出故障",
                "感知204号杆支线发生单相接地故障",
                "感知222号支线没有判断出故障",
                "感知204号杆支线发生单相接地故障",
                "感知225.9号塔支线没有判断出故障",
                "感知182号杆支线没有判断出故障",
                "感知235.3号塔支线没有判断出故障",
                "感知246.1号杆支线产生两相接地故障",
                "感知245.B3.1号杆支线没有判断出故障",
                "感知95号塔没有判断出故障",
                "感知96号塔没有判断出故障"
            ];

            
            // 在页面上显示故障信息，每次显示 6 个元素
            var faultsDiv = document.getElementById("faults");

            function displayFaults(startIndex) {
                // 清空之前的显示
                faultsDiv.innerHTML = "";

                // 循环展示 6 个元素
                for (var i = 0; i < 6; i++) {
                    var index = (startIndex + i) % faultsArray.length; // 循环索引
                    var p = document.createElement("p");
                    p.textContent = faultsArray[index];
                    faultsDiv.appendChild(p);
                }
            }

                // 初始展示前 6 个元素
            //displayFaults(0);

            // 每隔一段时间更新展示内容

            //var startIndex = parseInt(faultsDiv.firstChild.textContent.split(" ")[0])
            var cnt=0;

            function updateFaults() {
                // 获取当前展示的第一个元素的索引

                // 更新展示内容
                displayFaults(cnt);
                cnt++;
                if(cnt==faultsArray.length) cnt=0;

                // 递归调用自身，以便持续更新
                setTimeout(updateFaults, 3000); // 3 秒后再次调用自身
            }

            // 初始调用
            updateFaults();

        </script>
        <div id="fault-detection" class="custom-control" style="top: 150px;right: 50px;">
            <h4>保护动作历史统计</h4>
            <div id="protection"> </div>
        </div>
        <script>
            var historyArray = [
                "2024年2月29日  #163|一二次融合终端 启动差动保护",
                "2024年3月2日  #2L一二次融合终端 启动差动保护",
                "2024年3月7日  #3S一二次融合终端 启动差动保护" ,
                "2024年3月7日  AO1一二次融合终端 启动差动保护",
                "2024年3月8日  #222一二次融合终端 启动差动保护",
                "2024年3月9日  #226一二次融合终端 启动差动保护",
                "2024年3月7日  AO1一二次融合终端 启动差动保护",
                "2024年3月8日  #233一二次融合终端 启动差动保护",
                "2024年3月9日  AOR1一二次融合终端 启动差动保护",
            ];

            
            // 在页面上显示故障信息，每次显示 6 个元素
            var historyDiv = document.getElementById("protection");

            function displayHistory(startIndex) {
                // 清空之前的显示
                historyDiv.innerHTML = "";

                // 循环展示元素
                for (var i = 0; i < 4; i++) {
                    var index = (startIndex + i) % historyArray.length; // 循环索引
                    var p = document.createElement("p");
                    p.textContent = historyArray[index];
                    historyDiv.appendChild(p);
                }
            }

            // 每隔一段时间更新展示内容

            //var startIndex = parseInt(faultsDiv.firstChild.textContent.split(" ")[0])
            var cnt1=0;

            function updateHistory() {
                // 获取当前展示的第一个元素的索引

                // 更新展示内容
                displayHistory(cnt);
                cnt1++;
                if(cnt1==historyArray.length) cnt=0;

                // 递归调用自身，以便持续更新
                setTimeout(updateHistory, 3000); // 3 秒后再次调用自身
            }

            // 初始调用
            updateHistory();

        </script>

    <div class="button-container_home">
        <div class="form-grp-btn">
            <a href="/show_realtime_diagnostics" class="btn" style="background-color: rgb(65, 103, 227); color:white">实时诊断</a>
        </div>
        <div class="form-grp-btn">
            <a href="/show_detect_online" class="btn" style="background-color: rgb(65, 103, 227); color:white">在线监测</a>
        </div>
        <div class="form-grp-btn">
            <a href="/show_fault_history" class="btn" style="background-color: rgb(65, 103, 227); color:white">诊断历史</a>
        </div>
        <div class="form-grp-btn">
            <a href="/show_protect_status" class="btn" style="background-color: rgb(65, 103, 227); color:white">保护状态</a>
        </div>
        <div class="form-grp-btn">
            <a href="/show_recorder_data" class="btn" style="background-color: rgb(65, 103, 227); color:white">录波波形</a>
        </div>
    </div>


        <div class="custom-control" style="top: 480px; left: 50px;   /* 根据需要调整位置 */">
            <h4>故障诊断综合统计</h4>
            <p><img src="static/img/product/故障诊断综合统计.png" width="320px" style="opacity: 0.8;"></p>
        </div>
        <div class="custom-control" style="top: 700px; left: 50px;   /* 根据需要调整位置 */">
            <h4>故障诊断综合趋势</h4>
            <p><img src="static/img/product/故障诊断综合趋势.png" width="320px" style="opacity: 0.8;"></p>
        </div>
        <!-- <div class="custom-control" style="top: 400px; right: 50px;opacity: 0.8;">
            <h4>故障预测综合概率</h4>
        <div> -->
            <h4 style="position: absolute; top: 410px; right: 212px;z-index: 100;">故障预测综合概率</h4>
        <div  class="custom-control" style="top: 400px; right: 50px;opacity: 0.8;height: 240px;z-index: 0; "></div>
        <div class="wave1"  style="top: 550px; right: 50px;"></div>

        <h4 style="position: absolute; top: 680px; right: 212px;z-index: 100;">设备正常运行统计</h4>
        <div  class="custom-control" style="top: 670px; right: 50px;opacity: 0.8;height: 240px;z-index: 0; ">
        </div>
        <div class="wave2"  style="top: 820px; right: 50px;"></div>

        <!-- footer-area -->
        <footer class="footer-area" id="about">
            <div class="footer-top pt-65 pb-25">
                <div class="container">
                    <div class="row justify-content-between">
                        <div class="col-lg-3 col-md-6">
                            <div class="footer-widget mb-50">
                                <div class="fw-title mb-35">
                                    <h5>关于我们</h5>
                                </div>
                                <div class="fw-link">
                                    <ul>
                                        <li><a href="#">“云端智控”</a></li>
                                        <li><a href="#">全覆盖新型配电系统</a></li>
                                        <li><a href="#">在线监测与故障处理解决方案</a></li>
                                        <li><a href="#">  </a></li>
                                    </ul>
                                </div>
                                <div class="footer-social">
                                    <ul>
                                        <li><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                                        <li><a href="#"><i class="fab fa-instagram"></i></a></li>
                                        <li><a href="#"><i class="fab fa-twitter"></i></a></li>
                                        <li><a href="#"><i class="fab fa-pinterest-p"></i></a></li>
                                        <li><a href="#"><i class="fab fa-linkedin-in"></i></a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-xl-2 col-lg-3 col-sm-6">
                            <div class="footer-widget mb-50">
                                <div class="fw-title mb-35">
                                    <h5>版权所有</h5>
                                </div>
                                <div class="footer-contact">
                                    <ul>
                                        <li><a href="https://www.bjtu.edu.cn/" target="_blank">北京交通大学</a></li>
                                    </ul>
                                </div>
                                <div class="fw-link">
                                    <ul>
                                        <li><a href="#">云端智控团队</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-xl-2 col-lg-3 col-sm-6">
                            <div class="footer-widget mb-50">
                                <div class="fw-title mb-35">
                                    <h5>联系方式</h5>
                                </div>
                                <div class="fw-link">
                                    <ul>
                                        <li><a href="#">吕国梁</a></li>
                                        <li><a href="#">21231210@bjtu.edu.cn</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-xl-2 col-lg-3 col-sm-6">
                            <div class="footer-widget mb-50">
                                <div class="fw-title mb-35">
                                    <h5>合作伙伴</h5>
                                </div>
                                <div class="footer-contact">
                                    <ul>
                                        <li><a href="http://www.bj.sgcc.com.cn/" target="_blank">国网北京市电力公司</a></li>
                                        <li><a href="http://www.hyliton.com/" target="_blank">北京恒源利通电力技术有限公司</a></li>
                                        <li><a href="http://www.jibei.sgcc.com.cn/html/main/index.html" target="_blank">国网冀北电力有限公司电力科学研究院</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="copyright-wrap copyright-style-two">
                <div class="container">
                    <div class="row align-items-center">
                        <div class="col-lg-12 col-md-12">
                            <div class="copyright-text" style="text-align: center">
                                <p>Supported by BJTU</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </footer>
        <!-- footer-area-end -->


		<!-- JS here -->
        <script src="static/js/vendor/jquery-3.5.0.min.js"></script>
        <script src="static/js/popper.min.js"></script>
        <script src="static/js/bootstrap.min.js"></script>
        <script src="static/js/isotope.pkgd.min.js"></script>
        <script src="static/js/imagesloaded.pkgd.min.js"></script>
        <script src="static/js/jquery.magnific-popup.min.js"></script>
        <script src="static/js/owl.carousel.min.js"></script>
        <script src="static/js/jquery.odometer.min.js"></script>
        <script src="static/js/jquery.countdown.min.js"></script>
        <script src="static/js/jquery.appear.js"></script>
        <script src="static/js/slick.min.js"></script>
        <script src="static/js/ajax-form.js"></script>
        <script src="static/js/wow.min.js"></script>
        <script src="static/js/aos.js"></script>
        <script src="static/js/plugins.js"></script>
        <script src="static/js/main.js"></script>
        <script src="static/js/map.js"></script>
    </body>
</html>
